package com.wx.forum.model;



import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
@ApiModel("用户信息")
@Data
public class User {
    private Long id;
    @ApiModelProperty("用户名")
    private String username;
    @JsonIgnore//不参与序列化
    private String password;
    @ApiModelProperty("昵称")
    private String nickname;
    @ApiModelProperty("电话号码")
    private String phoneNum;
    @ApiModelProperty("电子邮件")
    private String email;
    @ApiModelProperty("性别")
    private Byte gender;
    @JsonIgnore
    private String salt;

    @JsonInclude(JsonInclude.Include.ALWAYS) //不管什么情况这个字段都参与json序列化
    @ApiModelProperty("头像地址")
    private String avatarUrl;

    private Byte iaAdmin;
    @ApiModelProperty("文章数量")
    private Integer articleCount;
    @ApiModelProperty("自我介绍")
    private String remark;

    private Byte state;
    @JsonIgnore
    private Byte deleteState;
    @ApiModelProperty("注册时间")
    private Date createTime;

    private Date updateTime;


}